/*
 * IBM Corporation.
 * Copyright (c) 2014 All Rights Reserved.
 */

package com.ibm.iisp.dataie.model;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedNativeQueries;
import javax.persistence.NamedNativeQuery;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.ibm.iisp.common.vo.AuditVO;


/**
 * 类作用：数据导入导出模板
 * 
 * @author Johnny@cn.ibm.com 使用说明：ID号小于1000的为系统模板，不能删除只能更新
 */
@Entity
@Table(name = "IISP_DATA_IE_TEMPLATE")
@NamedQueries({
	@NamedQuery(name = DataIETemplate.QUERY_BY_TABLE, query = "select dt from DataIETemplate dt where dt.tabName = :tableName order by dt.createTime desc")
})
@NamedNativeQueries({
	@NamedNativeQuery(name = DataIETemplate.DATA_EXPORT_TABLE_DEF, query = "select column_name, comments from iisp_data_ie_table_cols where table_name = ?1")
})
public class DataIETemplate extends AuditVO {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8415551466584792355L;
	// /**
	// * 配置表中的代码
	// */
	// public static final String CONFIG_CODE = "DATA_IE_TABLES";
	/**
	 * 
	 */
	public static final String QUERY_BY_TABLE = "DataIETemplate.QUERY_BY_TABLE";
	/**
	 * 
	 */
	public static final String DATA_EXPORT_TABLE_DEF = "DataIETemplate.TableDef";
	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE)
	@SequenceGenerator(allocationSize = 1, name = "SEQ_GEN_SEQUENCE")
	private Long id;
	private String tabName;
	private String dscName;
	private String fileUri;
	/**
	 * @return the id
	 */
	@Override
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the tabName
	 */
	public String getTabName() {
		return tabName;
	}
	/**
	 * @param table the tabName to set
	 */
	public void setTabName(String table) {
		this.tabName = table;
	}
	/**
	 * @return the dscName
	 */
	public String getDscName() {
		return dscName;
	}
	/**
	 * @param name the dscName to set
	 */
	public void setDscName(String name) {
		this.dscName = name;
	}
	
	/**
	 * @return the fileUri
	 */
	public String getFileUri() {
		return fileUri;
	}
	
	/**
	 * @param fileUri
	 *            the fileUri to set
	 */
	public void setFileUri(String fileUri) {
		this.fileUri = fileUri;
	}

}
